#ifndef __ENEMYMANAGER_H__
#define __ENEMYMANAGER_H__

#include <vector>

#include "cLog.h"
#include "cEnemy.h"
#include "cPersonaje.h"
#include "cItem.h"
#include "cMap.h"
#include "cGraph.h"

using namespace std;

#define E_COLLISION_NONE	0
#define E_COLLISION_LEFT	1
#define E_COLLISION_RIGHT	2
#define E_COLLISION_TOP		3
#define E_COLLISION_BOTTOM	4

typedef std::vector<cEnemy*> EnemyList;
typedef std::vector<cEnemy*>::iterator EnemyListIterator;

class cEnemyManager
{
public:
	cEnemyManager(void);
	~cEnemyManager(void);

	//bool Init();
	void Finalize();

	bool Load(char* filename);
	void UnLoad();

	void Process(cMap* Map, cGraph *Graph, cItem *Item, cPersonaje *Personaje);

	EnemyList* GetList();

	bool CheckCollisionWithPlayer(cEnemy *Enemy, cPersonaje *cPersonaje,int *primaryCollisionSide, int *secondaryCollisionSide);

private:
	EnemyList list;
	void GetNextMove(cEnemy *Enemy, cPersonaje *Player, int *next_eX, int *next_eY, int* next_direction);
	void GetNextPathMove(cGraph *Graph, cEnemy *Enemy, cPersonaje *Player, int *next_eX, int *next_eY, int* next_direction);

};
#endif